package com.studay.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 点播 课程信息
 * 
 * @author LY
 * 
 */
public class Course implements Parcelable {

	private String name; // Course名称
	private String filehash; // 文件hash值
	private String teacher; // 教师名
	private int playlength; // 播放
	private String teacherInfo; // 老师信息
	private String project; // 项目编号

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFilehash() {
		return filehash;
	}

	public void setFilehash(String filehash) {
		this.filehash = filehash;
	}

	public String getTeacher() {
		return teacher;
	}

	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}

	public int getPlaylength() {
		return playlength;
	}

	public void setPlaylength(int playlength) {
		this.playlength = playlength;
	}

	public String getTeacherInfo() {
		return teacherInfo;
	}

	public void setTeacherInfo(String teacherInfo) {
		this.teacherInfo = teacherInfo;
	}

	public String getProject() {
		return project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(filehash);
		dest.writeString(teacher);
		dest.writeString(name);
		dest.writeString(teacherInfo);
		dest.writeString(project);
		dest.writeInt(playlength);
	}

	public static final Parcelable.Creator<Course> CREATOR = new Creator<Course>() {
		public Course createFromParcel(Parcel source) {
			Course contact = new Course();
			contact.filehash = source.readString();
			contact.teacher = source.readString();
			contact.name = source.readString();
			contact.teacherInfo = source.readString();
			contact.project = source.readString();			
			contact.playlength = source.readInt();
			return contact;
		}

		public Course[] newArray(int size) {
			return new Course[size];
		}
	};
}